import { ref } from 'vue';
export default function () {
  let collapseCtrl = ref(['1']);
  let x = window.matchMedia('(min-width: 500px)');

  let cb = (x) => {
    if (x.matches) {
      collapseCtrl.value = ['1', '2', '3'];
    } else {
      collapseCtrl.value = ['1'];
    }
  };
  cb(x);
  x.addEventListener('change', cb);
  return {
    collapseCtrl,
  };
}
